package com.lsy.service.interf;

import java.util.List;

import com.lsy.entity.User;
import com.lsy.entity.UserCustom;
import com.lsy.entity.UserQueryVo;

public interface UserService extends ServiceInterface<User> {

	// 添加用户
	public void AddUser(UserCustom UserCustom) throws Exception;

	// 查询用户
	public List<UserCustom> findUserList(UserQueryVo userQueryVo) throws Exception;

	// 根据id查询用户信息
	public UserCustom findUserById(Integer id) throws Exception;

	// 修改用户信息
	public void UpdateUserInfo(Integer id, UserCustom userCustom) throws Exception;

	/**
	 * 删除用户信息
	 * 
	 * @param id
	 * @throws Exception
	 */
	public void deleteUser(Integer id) throws Exception;

	/**
	 * 登录
	 * 
	 * @param phone
	 *            电话号码
	 * @param password
	 *            密码
	 * @return 成功User，失败null
	 * @throws Exception
	 */
	public User login(String phone, String password) throws Exception;

	/**
	 * 查找用户的余额
	 * 
	 * @param userId
	 *            用户id
	 * @return 余额
	 * @throws Exception
	 */
	public long findUserMoney(int userId) throws Exception;

	/**
	 * 更新用户余额
	 * 
	 * @param money
	 *            余额
	 * @param userId
	 *            用户的id
	 * @return 成功true
	 * @throws Exception
	 */
	public boolean updateMoney(long money, int userId) throws Exception;

}
